orcli import txt

import text files (TXT), line-based or with fixed-width columns line-based (default): each line (or --linesPerRow lines) becomes a row fixed-width: split lines into columns by --columnWidths

Usage

Arguments
Path to one or more files or URLs. When FILE is -, read standard input.
(repeatable)
Options
store blank cells as empty strings instead of nulls
set column names (comma separated) hint: add --ignoreLines 1 to overwrite existing header row
conflicts: --headerLines
split lines into columns of x characters (comma separated) text exceeding the sum of all widths is put in an extra column
conflicts: --linesPerRow
set character encoding
attempt to parse cell text into numbers
parse x line(s) as column headers default: 1 (fixed-width only, line-based import has no header lines)
conflicts: --columnNames
ignore first x line(s) at beginning of file
add column with file source
add column with archive file name
load at most x row(s) of data
number of lines that make up one row (line-based only)
conflicts: --columnWidths
do not store blank rows
discard initial x row(s) of data
trim leading & trailing whitespace from strings
set a name for the OpenRefine project
set project tags (comma separated)
suppress log output, print errors only
Parent Environment Variables
URL to OpenRefine server

Examples

orcli import txt "file"
orcli import txt "file1" "file2"
head -n 100 "file" | orcli import txt
orcli import txt "https://example.com/file.txt"
orcli import txt "file" --linesPerRow 3 --columnNames "foo,bar,baz"
orcli import txt "file" --columnWidths "7,5"
orcli import txt "file" \
  --columnWidths "7,5" \
  --columnNames "foo,bar,baz" \
  --ignoreLines 1 \
  --encoding "ISO-8859-1" \
  --limit 100 \
  --trimStrings \
  --projectName "duplicates" \
  --projectTags "test,urgent"